﻿using NUnit.Framework;

namespace WpfApplication6.ViewModel
{
    [TestFixture]
    public class OneCommandViewModelTests
    {
        //fake implementation
        private class MyClass : IShell
        {
            public ViewModel MainPanel { get; set; }
        }

        [Test]
        public void HasSetMainPanelAfterExecutingCommandTest()
        {
            //arrange
            var shell = new MyClass();
            var viewModel = new OneCommandViewModel(shell);

            //act
            viewModel.Command.Execute(null);

            //assert
            Assert.IsTrue(shell.MainPanel != null);
        }
    }
}